package cn.gok;

/**
 * @ClassName abstract关键字
 * @Description TODO
 * @Author HP
 * @Date 10:49 2022/7/6
 * @Version 1.0
 **/
abstract class M{
    public void test1(){

    }
    public abstract void test2();
}
class MC extends M{
    @Override
    public void test2() {

    }
}

public class abstract关键字 {
    public static void main(String[] args) {
        M m = new MC();
        m.test2();
        M m2 = new M() {
            @Override
            public void test2() {

            }
        };
        m2.test2();

    }
}
